# Create month order for proper sorting
month_order = ['January', 'February', 'March', 'April', 'May', 'June',
'July', 'August', 'September', 'October', 'November', 'December']
# Group by month and calculate total transactions
monthly_trans = merged_df.groupby('Month')['Total_Trans_Amt'].sum().reset_index()
monthly_trans['Month'] = pd.Categorical(monthly_trans['Month'], categories=month_order, ordered=True)
monthly_trans = monthly_trans.sort_values('Month')
fig = px.line(monthly_trans, x='Month', y='Total_Trans_Amt',
title='Total Transaction Amount Over Time',
markers=True)
fig.update_traces(line_shape='spline', line=dict(color='#002366', width=3))
fig.update_layout(xaxis_title="Month", yaxis_title="Total Transaction Amount ($)",
margin=dict(l=80, r=30, t=50, b=150))
fig.show()